<?
include("gestione/includes/config.inc.php");
include("gestione/includes/auth.lib.php");
include("gestione/includes/function.inc.php");
include("gestione/includes/product_new.class.php");
include("gestione/includes/e-commerce_new.class.php");
include("gestione/includes/news.class.php");
include("gestione/includes/content.class.php");
include("gestione/includes/keywords.class.php");
include("gestione/includes/class.xml.php");
$lang = "ita";
$cid = $_GET['cid'];
if($cid=="")
  $cid = 2;
####################### SESSION ##############################################################
$newSession = new websession();
if($newSession->order != NULL) {
	$articoli = $newSession->order->getArticoli();
	if(count($articoli)>0) {
		$tot = $newSession->order->getTotale($articoli);
		if($newSession->order->idbuono > 0) $tot-=$newSession->order->buono;
		$str_tot = "&nbsp;TOTALE: &euro; ".number_format($tot,2,",",".");
	}
}
if($newSession->getStatus())  {
	$registrati = '<a href="/webproduct.php?op=logout" rel="nofollow"><img src="/images/logout.png"></a><br><br>
  <a href="/webproduct.php?op=profile" rel="nofollow"><img src="/images/profilo.png"></a>';
	$tablelogin = '';
}
################################ indicizzazione #####################################################
	 $newContent = new content(7);
	 $tagtitle = $newContent->tagtitle;
	 $tagkey = $newContent->tagkey;
	 $tagdesc = $newContent->tagdesc;
	 $metatitle = $newContent->metatitle;
	 $metakey = $newContent->metakey;
	 $metadesc = $newContent->metadesc;
	 $hidden = $newContent->hidden; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?
include("includes/header.php");
$spot = News::doSpotNew($tiponews);
?>
<meta name="google-site-verification" content="k2heQGK4TJ-hb9gvB2axm9nlk8PkaQnpR13BLK1QW0k" />
<script type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function flvFLSS4(){//v1.0
var v1=arguments,v2=v1[0],v3=MM_findObj(v2);if (v3&&v3.LSS7!=null){clearTimeout(v3.LSS7);}}

function flvFLSS3(){//v1.0
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1],v5='',v6;if (!v3.LSS4.complete){v6="flvFLSS3('"+v2+"',"+v4+")";setTimeout(v6,50);return;}if (v3.LSS3[v4][1]!=""){v5+='<a href="'+v3.LSS3[v4][1]+'"';if (v3.LSS2!=""){v5+=' target="'+v3.LSS2+'"';}v5+='>';}v5+='<img src="'+v3.LSS3[v4][0]+'" border="0" alt="">';if (v3.LSS3[v4][1]!=""){v5+='</a>';}if (v3.LSS3[v4][2]!=""){v5+='<br>'+unescape(v3.LSS3[v4][2]);}if (document.layers){v3.document.open();v3.document.write(v5);v3.document.close();}else {v3.innerHTML=v5;}}

function flvFLSS2(){//v1.0
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1],v5=v1[2],v6,v7,v8;if (v3&&v3.LSS3){flvFLSS4(v2);if (v4==1){v6=v3.LSS8+1;if (v6>v3.LSS3.length-1){v6=0;if (v3.LSS9==0){return;}}v8=v3.LSS3[v6][0];}else {v6=v3.LSS8-1;if (v6<0){v6=v3.LSS3.length-1;if (v3.LSS9==0){return;}}v8=v3.LSS3[v6][0];}v3.LSS8=v6;if (!document.layers&&!v3.LSS6){v3.LSS4=new Image();}v3.LSS4.src=v8;flvFLSS3(v2,v6);if (v5==1){v7="flvFLSS2('"+v2+"',"+v4+","+v5+")";v3.LSS7=setTimeout(v7,v3.LSS5);}}}

function flvFLSS1(){//v1.0
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4,v5;if (v3){v3.LSS5=v1[1];v5=v1[2];v3.LSS9=v1[3];v3.LSS2=v1[4];v3.LSS3=new Array();for (var v6=5;v6<v1.length;v6+=3){v3.LSS3[v3.LSS3.length]=new Array(v1[v6],v1[v6+1],v1[v6+2]);}v3.LSS8=0;v3.LSS6=(navigator.userAgent.toLowerCase().indexOf("netscape6")!=-1);v3.LSS4=new Image();v3.LSS4.src=v1[5];flvFLSS3(v2,0);if (v5){v4="flvFLSS2('"+v2+"',1,"+v5+")";v3.LSS7=setTimeout(v4,v3.LSS5);}}}
//-->
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2773334-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body onload="<?=$banner[1]?>">
<div class="contenitore">
<div id="importante">
   <div id="contenuto">
       <div style="clear:both"></div>
       <?php 
	   $doc = new DOMDocument();
	   $doc->load( 'http://www.bsvillage.com/getXmlBanner.php' );
	   $imgs = $doc->getElementsByTagName( "imgSlider" );
	   if ($imgs->length > 0) {
	   ?>
       <div id="slider-wrapper">
            <div id="slider" class="nivoSlider">
               <?php
                $listimages = "";			
                foreach( $imgs as $img ) {
                    $tagssrc = $img->getElementsByTagName( "src" );
                    $tagsrc = $tagssrc->item(0)->nodeValue;
                  
                    $tagstext = $img->getElementsByTagName( "text" );
                    $tagtext = str_replace("euro","&euro;",$tagstext->item(0)->nodeValue);
                  
                    $tagshref = $img->getElementsByTagName( "href" );
                    $taghref = $tagshref->item(0)->nodeValue;
                  
                    $listimages .= (!empty($taghref)?'<a href="'.$taghref.'">':'').'<img src="'.$tagsrc.'" title="'.utf8_decode($tagtext).'">'.(!empty($taghref)?'</a>':'')."\n";
                }
                echo $listimages;
                ?>
            </div>        
       </div>
       <?php } ?>
   <?
   echo category::getIconeHome($cid)
   ?>
<div style="width:100%"><img src="/images/titoli/tit-nostri-consigli.gif" /></div>
<div style="height:10px"></div>
<div style="width:100%; margin-left:15px"><?=articoli::getNovitaHome($cid,$lang);?></div>
   </div>
   <div id="left">
   <?include("includes/col-left.php")?>
   </div>
</div>
<? /*
<div id="right">
<?include("includes/col-right.php")?>
</div>*/ ?>
<div id="header">
<?include("includes/top.php")?>
</div>
<div id="footer">
<?include("includes/footer.php")?>
</div>
</div>
</body>
</html>